<?php /* Smarty version 2.6.20, created on 2013-05-27 05:17:55
         compiled from _core/_include/module/_mvc/control/handledialogordertype.tpl */ ?>
function HandleDialogOrderType(gui, item, options) {
  this._gui = gui;
  this._item = item;
  this._options = options;
  
  this._array = (options && options.array) ? options.array : [];
  this._callbackFunc = (options && options.callbackFunc) ? options.callbackFunc : '';
  
  this._createElements();
};

HandleDialogOrderType.prototype._createElements = function() {
  var _self = this, types = OrderType.array();
  this._gui.orderType.options[this._gui.orderType.options.length] = new Option('');
  for (var i = 0, il = types.length; i < il; i++) {
    var orderType = types[i];
    option = new Option(orderType);
    this._gui.orderType.options[this._gui.orderType.options.length] = option;
  }
  this._gui.orderType.onchange = function() { _self._callbackFunc.call(_self, this.options[this.selectedIndex].text); };
};